import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import generate from '@feidao/web/atom/browser/url/query2url';
import { captcha as url } from './config';

export default function a003(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	const t = new Date().getTime();
	const param = { opt: JSON.stringify({ width: 200 }), t };
	// 获取图片验证码
	const img = generate(param, url);
	const captcha = fd.data.node.querySelector('[data-feidao-id="captcha"]') as HTMLImageElement;
	captcha.src = img;
}
